//
//  ViewController.m
//  PickerView
//
//  Created by cuiwenjuan on 15-1-4.
//  Copyright (c) 2015年 anytum. All rights reserved.
//

#import "ViewController.h"
#import "MYWebViewController.h"
#import "MYPickerViewController.h"

@interface ViewController ()

@end

@implementation ViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    
    [self createPickerView];
    
    [self createWebView];
    
    [self createTable];
    
    
    
    
}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}
#pragma mark - ❤️
-(void)createTable
{
    UILabel * la = [[UILabel alloc]initWithFrame:CGRectMake(30, 300, 300, 400)];
    la.text = @"❤️🌹🚗🐱🐭🐂🐅🐰🐲🐍🐴🐑🐵🐔🐶🐷👍😒➕©🐦😊😢💔🍎🍑🍒⏰✈️🃏🚖😊😂☺️⌚️⬆️6⃣️👀👌′の💰5⃣️👂1⃣️👐📱🔥🐯🚂🍊👑🐻🌲🚪🎒📖🐟✨🌛☀️🐜😓☔️🌂❄️👔👗👕👅👖👞🏃☁️⛽️🌈🔪📷🐘🍌🌽🌾👏🚢👃❀🎺🎻📣💻🚇🎩🐧🌇🍵🍦🍲💃🙏♂♀🏫🍁🍺🍉☕️🎁🎅🎄🎎💒⛪️🚲🔋🚊🍠📌👧👦👨👩🍓🍍🍅😍🌻✌️✏️✒️📃📺🌎🇺🇸🇨🇳🇰🇷🇬🇧🇫🇷🇮🇹🇩🇪💗🇯🇵🇷🇺";
//    NSLog(@"%@",la.text);
    
    la.numberOfLines = 0;
    
    [self.view addSubview:la];

}


#pragma mark - webView💗
-(void)createWebView
{
    UIButton * button = [[UIButton alloc] initWithFrame:CGRectMake(180, 40, 120, 40)];
    [button setTitle:@"webView" forState:UIControlStateNormal];
    [button.layer setCornerRadius:10.0];
    [button setBackgroundColor:[UIColor orangeColor]];
    [button addTarget:self action:@selector(webViewClick:) forControlEvents:UIControlEventTouchUpInside];
    [self.view addSubview:button];

}

-(void)webViewClick:(UIButton *)button
{
    MYWebViewController * webview = [[MYWebViewController alloc]init];
    [self presentViewController:webview animated:YES completion:nil];
}

#pragma mark - 自己定义一个pickerView✨
-(void)createPickerView
{
    UIButton * button = [[UIButton alloc] initWithFrame:CGRectMake(20, 40, 120, 40)];
    [button setTitle:@"pickerView" forState:UIControlStateNormal];
    [button.layer setCornerRadius:10.0];
    [button setBackgroundColor:[UIColor orangeColor]];
    [button addTarget:self action:@selector(pickerViewClick:) forControlEvents:UIControlEventTouchUpInside];
    [self.view addSubview:button];
}

-(void)pickerViewClick:(UIButton *)button
{
    MYPickerViewController * picker = [[MYPickerViewController alloc]init];
    
    [self presentViewController:picker animated:YES completion:nil];
  
}
@end
